
package cn.nubia.admin.application.bean;

import cn.nubia.admin.common.mybatis.annotations.Id;
import cn.nubia.admin.common.mybatis.annotations.Table;
import cn.nubia.admin.common.mybatis.annotations.UnColumn;
import cn.nubia.admin.common.utils.DateUtil;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by justin on 15/6/29.
 * CREATE TABLE `nb_topic_soft_map` (
 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '关联id',
 `topic_id` int(11) DEFAULT NULL COMMENT '专题id',
 `soft_id` int(11) DEFAULT NULL COMMENT '软件id',
 `sort_index` int(11) DEFAULT NULL COMMENT '排序号',
 `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
 `expired_time` int(11) DEFAULT NULL COMMENT '过期时间',
 `start_time` int(11) DEFAULT NULL COMMENT '开始时间',
 `last_modify_time` int(11) DEFAULT NULL,
 `create_admin_id` int(11) DEFAULT NULL COMMENT '创建人的管理员id',
 `create_admin_name` varchar(20) DEFAULT NULL COMMENT '创建人的管理员名称',
 `modify_admin_id` int(11) DEFAULT NULL COMMENT '修改人的管理员id',
 `modify_admin_name` varchar(20) DEFAULT NULL COMMENT '修改人的管理员名称',
 `is_delete` tinyint(4) DEFAULT NULL COMMENT '是否删除（0：未删除  1：删除）',
 PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='专题软件关联表';

 SET FOREIGN_KEY_CHECKS = 1;
 */
//软件专题对象.
@Table(value = "nb_topic_soft_map")
public class TopicSoftMap implements Serializable{

    private static final long serialVersionUID = -8244661101951482489L;

    public static final String COLUMN_SOFTID = "softId";

    public static final String COLUMN_ISDELETE = "isDelete";

    public static final int DELETE = 1;
    //关联id
    @Id(value = "id")
    private Integer id;
    //专题id
    private Integer topicId;
    //软件id
    private Integer softId;
    //排序号
    private Integer sortIndex;
    //创建时间
    private Integer createTime;
    //过期时间
    private Integer expiredTime;
    //开始时间
    private Integer startTime;
    //最后修改时间
    private Integer lastModifyTime;
    //创建人的管理员id
    private Integer createAdminId;
    //创建人的管理员名称
    private String createAdminName;
    //修改人的管理员id
    private Integer modifyAdminId;
    //修改人的管理员名称
    private String modifyAdminName;
    //是否删除（0：未删除  1：删除）
    private Integer isDelete;
    @UnColumn
    private Date startDate;
    @UnColumn
    private Date expiredDate;


    @UnColumn
    private String expiredTimeShow;
    @UnColumn
    private String startTimeShow;
    @UnColumn
    private String softName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public Integer getSoftId() {
        return softId;
    }

    public void setSoftId(Integer softId) {
        this.softId = softId;
    }

    public Integer getSortIndex() {
        return sortIndex;
    }

    public void setSortIndex(Integer sortIndex) {
        this.sortIndex = sortIndex;
    }

    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    public Integer getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(Integer expiredTime) {
        this.expiredTime = expiredTime;
        if(expiredTime!=null){
            this.setExpiredTimeShow(DateUtil.getFormatDate(expiredTime));
        }
    }

    public Integer getStartTime() {
        return startTime;
    }

    public void setStartTime(Integer startTime) {
        this.startTime = startTime;
        if(startTime!=null){
            this.setStartTimeShow(DateUtil.getFormatDate(startTime));
        }
    }

    public Integer getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Integer lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    public Integer getCreateAdminId() {
        return createAdminId;
    }

    public void setCreateAdminId(Integer createAdminId) {
        this.createAdminId = createAdminId;
    }

    public String getCreateAdminName() {
        return createAdminName;
    }

    public void setCreateAdminName(String createAdminName) {
        this.createAdminName = createAdminName;
    }

    public Integer getModifyAdminId() {
        return modifyAdminId;
    }

    public void setModifyAdminId(Integer modifyAdminId) {
        this.modifyAdminId = modifyAdminId;
    }

    public String getModifyAdminName() {
        return modifyAdminName;
    }

    public void setModifyAdminName(String modifyAdminName) {
        this.modifyAdminName = modifyAdminName;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public String getExpiredTimeShow() {
        return expiredTimeShow;
    }

    public void setExpiredTimeShow(String expiredTimeShow) {
        this.expiredTimeShow = expiredTimeShow;
    }

    public String getStartTimeShow() {
        return startTimeShow;
    }

    public void setStartTimeShow(String startTimeShow) {
        this.startTimeShow = startTimeShow;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
        if(startDate!=null){
            this.setStartTime(DateUtil.getIntegerTime(startDate));
        }
    }

    public Date getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(Date expiredDate) {
        this.expiredDate = expiredDate;
        if(expiredDate!=null){
            this.setExpiredTime(DateUtil.getIntegerTime(expiredDate));
        }
    }

    public String getSoftName() {
        return softName;
    }

    public void setSoftName(String softName) {
        this.softName = softName;
    }
}
